<script type="text/javascript" src="/resource/js/ajaxfileupload/ajaxfileupload.js"></script>
<script type="text/javascript">
function uploadimg(item)
{
    alert(item);
    $.ajaxFileUpload ( {
        url: '/test/dibiao/upload', 
        secureuri: false, //是否需要安全协议，一般设置为false
        fileElementId: 'uploadimg_kkk', //文件上传域的ID
        dataType: 'json', //返回值类型 一般设置为json
        success: function (data, status)  //服务器成功响应处理函数
        {
            alert(0);
            alert(data);
        },

        error: function (data, status, e)//服务器响应失败处理函数
        {
            alert(1);
            alert(e);
        }
    });
    return false;
}
</script>


<div class="uploadimg">
    <p><input type="file" id="uploadimg_kkk" name="uploadimg_kkk" /></p>
    <input type="button" value="上传" onclick="uploadimg(this)"/>
</div>
